<template>
  <div>这是二级列表页-{{ datalist }}</div>
</template>

<script>
export default {
  data() {
    return {
      datalist: "水果"
    };
  },

  components: {},

  methods: {},

  created() {
    //发送请求，获取第一个分类的数据先渲染到页面。
    console.log(localStorage.getItem("type"), 999);
    // this.datalist = localStorage.getItem("type");
  },

  watch: {
    $route: {
      deep: true,
      handler(newRoute) {
        console.log(newRoute, 123);
        //获取关键字，发送ajax，拿到的数据，放到 datalist
      }
    }
  }
};
</script>

<style scoped>
</style>